﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="List.aspx.cs" Inherits="Cn.Cellula.Website.Admin.Item.List" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link type="text/css" rel="Stylesheet" href="/Cellula_Client/controls/JskitControls.css" />
    <script type="text/javascript" src="/jskit.org/model/controls/JskitRichDropDownList.js"></script>
    <script type="text/javascript">
        var jrddlCategory = new JskitRichDropDownList("jrddlCategory");
        function PageOnLoad() {
            jrddlCategory.deployTree(fixId("txt_CategoryName"), fixId("hid_CategoryId"), "Ws/_Category.aspx?ok=&rk=", "t", fixId("hid_CategoryTypeId"));
        }
    </script>
    <script type="text/javascript" src="/jskit.org/Server/JskitXmlHttp.js"></script>

    <link type="text/css" rel="Stylesheet" href="/Cellula_Client/Controls/JskitFileUpload.css" />

    <script type="text/javascript" src="/Cellula_client/Controls/JskitFileUpload.js"></script>

    <script type="text/javascript">
        var jfu = new JskitFileUpload("jfu");
        jfu.setModeName("<%=ModelName %>");
        jfu.setFilePattern(null);
        function showPicPanel(sender) {
            jfu.setModelKey(sender.getAttribute("pid"));
            jfu.display();
        }
    </script>
 </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH_PageTitle" runat="server">
    对象管理
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPH_MainBody" runat="server">
    <fieldset>
        <legend>查询</legend>
        <table border="0" cellpadding="0" cellspacing="0" class="query_table">
            <tr>
                <td class="query_title">
                    名称：
                </td>
                <td class="query_content">
                    <asp:TextBox ID="txt_ItemName" runat="server" MaxLength="50"></asp:TextBox>
                </td>
                <td class="query_title">
                    标签：
                </td>
                <td class="query_content">
                    <asp:TextBox ID="txt_ItemTags" runat="server" MaxLength="50"></asp:TextBox>
                </td>
                <td class="query_title">
                    分类：
                </td>
                <td class="query_content">
                    <asp:TextBox runat="server" ID="txt_CategoryName"></asp:TextBox>
                    <asp:HiddenField runat="server" ID="hid_CategoryId" />
                </td>
            </tr>
        </table>
    </fieldset>
    <div class="action_bar">
        <asp:Button ID="btn_Query" runat="server" Text="查询" OnClick="btn_Query_Click" />
        <asp:Button ID="btn_SuperQuery" runat="server" Text="高级查询" OnClick="btn_SuperQuery_Click" />
        &nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="btn_EOAdd" runat="server" Text="增加" OnClick="btn_EOAdd_Click" />
        <asp:Button ID="btn_EOUpdate" runat="server" Text="修改" OnClientClick="return acu.gv.checkMultiSelect(fixId('gvItem'));"
            OnClick="btn_EOUpdate_Click" />
        <asp:Button ID="btn_EODel" runat="server" Text="删除" OnClientClick="return acu.gv.checkDelete(fixId('gvItem'));"
            OnClick="btn_EODel_Click" />
    </div>
    <fieldset>
        <legend>对象列表</legend>
        <asp:GridView ID="gvItem" runat="server" AutoGenerateColumns="false" CssClass="GridView"
            DataKeyNames="ItemKey" AllowPaging="True" PageSize="20" PagerSettings-Mode="Numeric"
            OnPageIndexChanging="gvItem_PageIndexChanging">
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <input id="CheckAll" onclick="return acu.gv.selectAll(this,event);" tabindex="0"
                            type="checkbox" title="点击全选或反全选当前页所有信息" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:CheckBox ID="cbxRow" runat="server" CausesValidation="False"></asp:CheckBox>
                    </ItemTemplate>
                    <ItemStyle Width="10px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="名称">
                    <ItemTemplate>
                        <a href='Admin/Item/ItemView.aspx?id=<%# DataBinder.Eval(Container, "DataItem.ItemKey")%>'>
                            <%# DataBinder.Eval(Container, "DataItem.ItemName")%></a>
                    </ItemTemplate>
                    <ItemStyle />
                </asp:TemplateField>
                <asp:BoundField DataField="ItemNo" HeaderText="编号"></asp:BoundField>
                <asp:TemplateField HeaderText="分类">
                    <ItemTemplate>
                        <a href='Admin/Item/List.aspx?cid=<%# DataBinder.Eval(Container, "DataItem.CategoryKey")%>'>
                            <%# DataBinder.Eval(Container, "DataItem.CategoryName")%></a>
                    </ItemTemplate>
                    <ItemStyle />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="附件">
                    <ItemTemplate>
                        <img onclick="showPicPanel(this,event)" pid='<%# DataBinder.Eval(Container, "DataItem.ItemKey")%>' src='/Cellula_client/Default/Images/Item/icon_file_sign<%# DataBinder.Eval(Container, "DataItem.FileCount")%>.png' width="16px" height="16px" alt="" /><%# DataBinder.Eval(Container, "DataItem.FileCount")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="DeptName" HeaderText="部门"></asp:BoundField>
                <asp:BoundField DataField="ItemTags" HeaderText="标签"></asp:BoundField>
                <asp:BoundField DataField="UpdateDt" HeaderText="最后更新" ItemStyle-Width="60px"></asp:BoundField>
                <asp:TemplateField HeaderText="">
                    <ItemTemplate>
                        <a href='Admin/Item/EditItem.aspx?id=<%# DataBinder.Eval(Container, "DataItem.ItemKey")%>'
                            title="编辑基本属性">
                            <img src='/Cellula_client/Default/Images/sign_product_base_edit.png' width="16" height="16"
                                alt="编辑基本属性" border="0" /></a><a href='Admin/Item/EditAtl.aspx?id=<%# DataBinder.Eval(Container, "DataItem.ItemKey")%>'
                            title="编辑扩展属性">
                            <img src='/Cellula_client/Default/Images/sign_product_atl_edit.png' width="16" height="16"
                                alt="编辑扩展属性" border="0" /></a></ItemTemplate>
                    <ItemStyle Width="36px" />
                </asp:TemplateField>
            </Columns>
            <PagerTemplate>
                共有<asp:Label runat="server" ID="LAB_PAGER_TOTALCOUNT"></asp:Label>条记录
                | <asp:LinkButton ID="lbnFirst" runat="Server" Text="首页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                    CommandName="Page" CommandArgument="First"></asp:LinkButton>
                | <asp:LinkButton ID="lbnPrev" runat="server" Text="上一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>'
                    CommandName="Page" CommandArgument="Prev"></asp:LinkButton>
                <asp:DropDownList runat="server" ID="DDL_PAGER_SELECTOR" OnSelectedIndexChanged="gvPager_OnSelectedIndexChanged" AutoPostBack="true" >
                </asp:DropDownList>
                <asp:LinkButton ID="lbnNext" runat="Server" Text="下一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                    CommandName="Page" CommandArgument="Next"></asp:LinkButton>
                | <asp:LinkButton ID="lbnLast" runat="Server" Text="尾页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>'
                    CommandName="Page" CommandArgument="Last"></asp:LinkButton>
            </PagerTemplate>
            <HeaderStyle CssClass="GridViewHeader" />
            <RowStyle CssClass="GridViewRow" />
            <FooterStyle CssClass="GirdViewFooter" />
            <AlternatingRowStyle CssClass="GirdViewAlternatingRow" />
            <PagerStyle CssClass="GridViewPager" />
            <EmptyDataRowStyle CssClass="GridViewEmptyDataRow" />
            <EmptyDataTemplate>
                没有可用的数据</EmptyDataTemplate>
        </asp:GridView>
    </fieldset>
</asp:Content>
